<?php
/**
 * Project: AIGC
 * Author: moufer <moufer@163.com>
 * Date: 2024/7/6 23:26
 */

namespace module\ai\library\channel\llm;

class BaiduErnie40 extends BaiduErnieLite
{
    /**
     * @inheritdoc
     */
    public static function versions(): array
    {
        return [
            '8k'        => 'ERNIE-4.0-8K',
            '8k-latest' => 'ERNIE-4.0-8K-Latest',
        ];
    }

    /**
     * @inheritdoc
     */
    protected function getEndPoint(): ?string
    {
        return match ($this->config['model'] ?? '8k') {
            '8k' => 'completions_pro',
            '128k' => 'ernie-4.0-8k-latest',
            default => null,
        };
    }

}